var HBEncrypt = {};
HBEncrypt.rsaPublicKey = '-----BEGIN PUBLIC KEY-----MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCFYQW/u7y2tfbgCuRVjZgTX1WNazXaTs7htS+8Hq5aLoebx7iqBOnh16EHGV7mx8aG2a4VL85m+FVIXSyNLdQmaw6d+avTokSyb4vLorE2/JZhBVHDLe+lBmkJNfudeuqDB1NK4hipDFqHoqazG8YBPPK3cr5++M11u1DXSuYGxQIDAQAB-----END PUBLIC KEY-----';
if (_hbEnvFlag == "3") { // 测试环境
	HBEncrypt.rsaPublicKey = '-----BEGIN PUBLIC KEY-----MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCKUcUIP56o7DF3dNesBvjrvZozVB0aD6UkLQtWSa95JcZ8F1sbn+vEWIQ50ODfpRnFKVEbeJFVPFPmwc2g0wG83Of8FJWKyzeB8iDTF8XHWWsO249vmbIT72Y1UO5Wb73pdeGy3oyH947WiveNNmIKmupiSx+O2D3a66NeUtAz5QIDAQAB-----END PUBLIC KEY-----';
}
HBEncrypt.rsaEncrypt = function(plainVal) {
	var encrypt = new JSEncrypt();
	encrypt.setPublicKey(window.hbPublicKey);
	return encrypt.encrypt(plainVal);
};

HBEncrypt.rsaDecrypt = function(encryptVal) {
	var decrypt = new JSEncrypt();
	decrypt.setPrivateKey(window.hbPublicKey);
	return decrypt.decrypt(encryptVal);
};
